import com.gaogzhen.service.WeatherSOAP;
import com.gaogzhen.service.WeatherWS;
import org.apache.cxf.jaxws.JaxWsProxyFactoryBean;

public class WeatherCxfClient {
    public static void main(String[] args) {
        JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
        factory.setServiceClass(WeatherSOAP.class);
        factory.setAddress("http://127.0.0.1:9001/weather");
        WeatherSOAP service = (WeatherSOAP)factory.create();
        String weather = service.queryWeather("济南");
        System.out.println(weather);
    }
}
